﻿<UserControl x:Class="MiniUML.Plugins.Home.Controls.Shapes.Normal"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:controls="clr-namespace:MiniUML.View.Controls;assembly=MiniUML.View"
             xmlns:views="clr-namespace:MiniUML.View.Views;assembly=MiniUML.View"
             xmlns:utilities="clr-namespace:MiniUML.View.Utilities;assembly=MiniUML.View"
             x:Name="_this"
             Height="0" Width="0"
             views:CanvasView.CustomDrag="True">
    
    <UserControl.Resources>
        <utilities:ShapeIdToControlConverter x:Key="ShapeIdToControlConverter" />
    </UserControl.Resources>

    <Canvas>
        <Line X1="0" Y1="0" X2="50" Y2="0" Stroke="Navy">
            <Line.RenderTransform>
                <RotateTransform Angle="{Binding ElementName=anchor, Path=AngleInDegrees}" />
            </Line.RenderTransform>
        </Line>
        <controls:AnchorPoint Left="{Binding Attribute[Left].Value}" Top="{Binding Attribute[Top].Value}" x:Name="anchor"
                SnapTarget="{Binding Path=Attribute[SnapTarget].Value, Converter={StaticResource ShapeIdToControlConverter}}" />
    </Canvas>
    
</UserControl>
